//导入vue-router
import {creteRouter,createWebHashHistory} from 'vue-router'
//创建路由
const router = creteRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            name: 'Home',
            component: () => import('../views/Home.vue'),
            children: [
                {
                    path: 'user',
                    name: 'User',
                    component: () => import('../views/User.vue'),
                },
                {
                    path: 'role',
                    name: 'Role',
                    component: () => import('../views/Role.vue'),
                }
            ]
        }
    ]
})